//
//  HTCFQuickCacheUitilMacrocDefine.h
//  HTHappySale
//
//  Created by 创维海通 on 2017/9/15.
//  Copyright © 2017年 zxyywy. All rights reserved.
//

#import "HTCFQuickCacheUitil.h"

#ifndef HTCFQuickCacheUitilMacrocDefine_h
#define HTCFQuickCacheUitilMacrocDefine_h

/**
 *  检查一个valueObj,keyObj对象是否有一个是空的
 */
#define HTCFCheckKeyValueHasNull(keyObj,valueObj) [HTCFQuickCacheUitil checkValue:valueObj key:keyObj]

/**
 *  检查一个对象是否为空
 */
#define HTCFCheckObjectNull(object) [HTCFQuickCacheUitil isNullObject:object]

/**
 *  NSUserDefault 保存键值对 keyObj,valueObj
 */
#define HTCFUDFCache(keyObj,valueObj) [HTCFQuickCacheUitil userDefaultCache:valueObj key:keyObj]

/**
 *  NSUserDefault 删除键keyObj对应的值
 */
#define HTCFUDFRemove(keyObj) [HTCFQuickCacheUitil userDefaultRemove:keyObj]

/**
 *  NSUserDefault 获取键keyObj对应的值
 */
#define HTCFUDFGetValue(keyObj) [HTCFQuickCacheUitil userDefaultGetValue:keyObj]

/**
 *  NSUserDefault 判断键keyObject对应的值是否为空
 */
#define HTCFUDFEmptyValue(keyObj) [HTCFQuickCacheUitil userDefaultEmptyValue:keyObj]

/**
 *  获取系统默认文件管理
 */
#define HTCFFileManager [HTCFQuickCacheUitil fileManager]

/**
 *  指定路径pathObj是否存在文件
 */
#define HTCFFileIsExist(pathObj) [HTCFQuickCacheUitil fileExist:pathObj]

/**
 *  指定路径pathObj是否存在目录
 */
#define HTCFFileDirectoryIsExist(pathObj) [HTCFQuickCacheUitil directoryExist:pathObj]

/**
 *  读取某个路径的二进制数据，返回 NSData
 */
#define HTCFFileRead(pathObj) [HTCFQuickCacheUitil readFromFile:pathObj]

/**
 *  将二进制数据写入文件 dataObj:NSData pathObj:NSString
 */
#define HTCFFileWrite(dataObj,pathObj) [HTCFQuickCacheUitil writeFileData:dataObj toPath:pathObj]

/**
 *  在指定路径创建目录，返回BOOL结果
 */
#define HTCFFileDirectoryCreate(pathObj) [HTCFQuickCacheUitil createDirectory:pathObj]

/**
 *  删除指定路径文件
 */
#define HTCFFileDeleteFile(path) [HTCFQuickCacheUitil deleteFileAtPath:path]

/**
 *  删除指定目录
 */
#define HTCFFileDeleteDirectory(path) [HTCFQuickCacheUitil deleteDirectoryAtPath:path]


/**
 *  从指定路径读取被归档过的对象
 */
#define HTCFUnArchieveObject(fromFilePath) [HTCFQuickCacheUitil unarchieveFromPath:fromFilePath]

/**
 *  获取NSDocumentDirectory目录
 */
#define HTCFAppDocumentDirectory [HTCFQuickCacheUitil documentDirectory]

/**
 *  获取NSCacheDirectory目录
 */
#define HTCFAppCacheDirectory [HTCFQuickCacheUitil cacheDirectory]

/**
 *  返回文件名为fileName在NSDocumentDirectory中的路径
 */
#define HTCFAppDoucmentPath(fileName) [HTCFQuickCacheUitil documentDirectoryPath:fileName]

#endif /* HTCFQuickCacheUitilMacrocDefine_h */
